package cn.sumpu.app.coolsk.dao;

import java.util.*;
import cn.sumpu.app.coolsk.domain.*;
import cn.sumpu.app.coolsk.exception.AppBusinessException;

public interface InfoDao {

	/**
	 * author BruceZhang
	 * @param info
	 * 添加信息
	 * @throws AppBusinessException
	 */
	void addInfo(Info info)throws AppBusinessException;
	
	/**
	 * author BruceZhang
	 * @param map
	 * @return	查询信息
	 * @throws AppBusinessException
	 */
	List<Info> getInfo(Map<String, Object> map)throws AppBusinessException;
	//查询信息总条数
	Integer getInfoCount(Map<String, Object> map)throws AppBusinessException;
	//删除信息
	void deleteInfo(String id)throws AppBusinessException;
	//更新信息
	void updateInfo(Info info)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param id	信息ID
	 * @return	通过ID取得某条信息
	 * @throws AppBusinessException
	 */
	Info getInfoById(String id)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map	ID/+views
	 * 更新浏览次数
	 * @throws AppBusinessException
	 */
	void updateInfoViews(Map<String, Object> map)throws AppBusinessException;
	/**
	 * author BruceZhang
	 * @param map	ID/+comments
	 * 更新点评数
	 * @throws AppBusinessException
	 */
	void updateInfoComments(Map<String, Object> map)throws AppBusinessException;
	
}
